cmake_minimum_required(VERSION 2.8 FATAL_ERROR)

include_directories(${CMAKE_CURRENT_SOURCE_DIR})

find_package(LibPiutils REQUIRED)
include_directories(${LibPiutils_INCLUDE_DIRS})
set(LIBS ${LibPiutils_LIBRARIES})

find_package(HDF4 REQUIRED)
include_directories(${HDF4_INCLUDE_DIRS})
list(APPEND LIBS ${HDF4_LIBRARIES})

add_library (hdf4utils
  hdf_utils.c
  hdf4_utils.c
)

target_link_libraries(hdf4utils ${LIBS})

install (TARGETS hdf4utils DESTINATION lib)
